/*
 * 练习21：创建一个Enum，通过Values循环打印每个值和它的ordinal().
 * 练习22：为Enum写一个Switch()语句，对于每一个case，输出该特定货币的描述.
 */

package chapter5_InitializationAndCleanUp;
import java.rmi.activation.UnknownGroupException;

import publicLibs.p;
import publicLibs.Girls;

public class E21E22_EnumTest1 {
	public static void main(String[] args) {
		for(Girls g: Girls.values()){
			p.pNoln(g);
			p.p("It's ordinal: "+ g.ordinal());
		}
		
		for(Girls g: Girls.values()){
			p.pNoln("This is case of");
			switch(g){
				case UGLY:
					p.p(g);
					break;
				case NORMAL:
					p.p(g);
					break;
				case BEAUTIFUL:
					p.p(g);
					break;
				case ANGEL:
					p.p(g);
					break;
				default:
					p.p(g);
			}
		}
		
	}
}
